

package com.era7bioinformatics.aws.s3.components.generic

import com.era7bioinformatics.aws.components.AwsEndpoint
import java.net.URL

trait Endpoint extends AwsEndpoint[Service] {
  
}

object Endpoint {


  def apply(s3Service: Service): Endpoint = new EndpointImpl(s3Service)


  /**
   * Implementation class
   */
  private class EndpointImpl(s3Service: Service) extends Endpoint {


    override lazy val url = buildEndpointUrl(s3Service)


    

    private def buildEndpointUrl(s3Service: Service): URL = {

      val theUrl: String = s3Service.name + awsDomain.getHost   

      new URL("http", theUrl, "")
    }

    



    
  }

}
